<!DOCTYPE html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  
 </head>
 <body>
  <script>
var person = {id:1,name:"张三",age:20};		//定义一个对象
for(key in person){
    document.write(key+":"+person[key]);
    document.write('<br/>');
}

  </script>
 </body>
</html>
